package com.dzm.listener;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 作者：Dzm
 * 时间：2024-09-10-10:14
 * 功能：
 */

@Component
@RabbitListener(queues = "dxg")
public class MyRabbitListener {

    @RabbitHandler
    public void test(String message) {
        System.out.println("消费消息：" + message);
    }
}
